﻿using System.Windows.Data;

namespace estoque
{
    class IsRunningToTextConverter : IValueConverter
    {
        public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            bool result;
            if (bool.TryParse(value.ToString(), out result))
            {
                if (result)
                {
                    return "pause";
                }
            }

            return "play";
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new System.NotImplementedException();
        }
    }
}